scheme@(guile-user)> (add-to-load-path ".")
scheme@(guile-user)> (load "macros/testfile.scm")
scheme@(guile-user)> (replace-result-placeholder result (lambda (a) (+ a 1)))
$3 = (replace-result-placeholder result (lambda (+ a 1) (list (replace-result-placeholder result (a)))))
scheme@(guile-user)> ;; the first argument moved to the list -- OK!
scheme@(guile-user)> (replace-result-placeholder result (lambda (+ a 1) (list (replace-result-placeholder result (a)))))
$4 = (replace-result-placeholder result (lambda (list (replace-result-placeholder result (a)) (replace-result-placeholder result (+ a 1)))))
scheme@(guile-user)> ;; second argument (argument list) moved to the list of transformed expression -- OK!
scheme@(guile-user)> (replace-result-placeholder result (lambda (list (replace-result-placeholder result (a)) (replace-result-placeholder result (+ a 1)))))
$5 = ((replace-result-placeholder result lambda) (replace-result-placeholder result (a)) (replace-result-placeholder result (+ a 1)))
scheme@(guile-user)> ;; lambda was transformed as well! -- OK!
scheme@(guile-user)> `(,(replace-result-placeholder result lambda) ,(replace-result-placeholder result (a)) ,(replace-result-placeholder result (+ a 1)))
$6 = (lambda (a) (replace-result-placeholder result (+ 1 (list (replace-result-placeholder result a)))))
scheme@(guile-user)> ;; OK now it looks at the body
scheme@(guile-user)> `(lambda (a) ,(replace-result-placeholder result (+ 1 (list (replace-result-placeholder result a)))))
$7 = (lambda (a) (replace-result-placeholder result (+ (list (replace-result-placeholder result a) (replace-result-placeholder result 1)))))
scheme@(guile-user)> `(lambda (a) ,(replace-result-placeholder result (+ (list (replace-result-placeholder result a) (replace-result-placeholder result 1)))))
$8 = (lambda (a) ((replace-result-placeholder result +) (replace-result-placeholder result a) (replace-result-placeholder result 1)))
scheme@(guile-user)> ;; all parts of (+ a 1) transformed! -- OK
scheme@(guile-user)> `(lambda (a) (,(replace-result-placeholder result +) ,(replace-result-placeholder result a) ,(replace-result-placeholder result 1)))
$9 = (lambda (a) (+ a 1))
scheme@(guile-user)> ;; All OK!
scheme@(guile-user)>
